package com.taritari.journal.utils;

/**
 * @author taritari
 * @date 2024-05-12 14:38
 * @description
 */
public class TokenUtils {
    private static final ThreadLocal<String> currentUser = new ThreadLocal<>();

    public static void setCurrentUser(String username) {
        currentUser.set(username);
    }

    public static String getCurrentUser() {
        return currentUser.get();
    }

    public static void clearCurrentUser() {
        currentUser.remove();
    }
}